<template>
  <div class="errPage-container">
    <img src="imgs/404.png" />
    <div class="msg">本账号无权限，请联系管理员配置权限</div>
    <div>
      <el-button class="btn" @click="back" round> 返回上一页 </el-button>
      <el-button class="btn" @click="$store.dispatch('logout')" round>
        更换账号
      </el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: "Page403",
  methods: {
    back() {
      if (this.$route.query.noGoBack) {
        this.$router.push({ path: "/" });
      } else {
        this.$router.go(-1);
      }
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/styles/variables.scss";
.errPage-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  .msg {
    font-size: 20px;
    color: #666;
  }
  .btn {
    margin-top: 13px;
    margin-right: 18px;
    border-color: $--color-primary;
    color: $--color-primary;
  }
  img {
    height: 335px;
    width: 460px;
  }
}
</style>
